package fr.afcepf.atod18.restaurants.service;

import fr.afcepf.atod18.restaurants.entity.Promotion;
import fr.afcepf.atod18.restaurants.idao.IDaoPromotion;

public class GestionPromotion implements IGestionPromotion {
	private IDaoPromotion  daoPromotion;
	
	public IDaoPromotion getDaoPromotion() {
		return daoPromotion;
	}

	public void setDaoPromotion(IDaoPromotion daoPromotion) {
		this.daoPromotion = daoPromotion;
	}

	@Override
	public void creerPromotion(Promotion promotion) {
		daoPromotion.creerPromotion(promotion);
	}

	@Override
	public void activerPromotion(Promotion promotion) {
		daoPromotion.activerPromotion(promotion);
	}

	@Override
	public void desactiverPromotion(Promotion promotion) {
		daoPromotion.desactiverPromotion(promotion);
	}

	@Override
	public Promotion chercherPromotion(int idPromotion) {
		return daoPromotion.chercherPromotion(idPromotion);
	}

}
